cmake_minimum_required(VERSION 3.20)
project(find_road_ui LANGUAGES C CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

if (NOT CMAKE_BUILD_TYPE)
  set(CMAKE_BUILD_TYPE Release)
endif()

add_executable(find_road_ui
  src/main.cpp
  src/grid.cpp
  src/algorithms.cpp
  src/engine.cpp
  src/ui.cpp
)

if (MSVC)
  target_compile_options(find_road_ui PRIVATE /W4)
elseif(MINGW)
  target_link_options(find_road_ui PRIVATE -static -mwindows)
else()
  target_compile_options(find_road_ui PRIVATE -Wall -Wextra -Wpedantic)
endif()

if (WIN32)
  target_link_libraries(find_road_ui PRIVATE gdi32 user32)
endif()

